import { createStore } from "vuex";

const store = createStore({
  state() {
    return {
      isJudge: false,//控制组件中loading的显示与隐藏
    };
  },
  mutations: {
    showLoading(state) {
      state.isJudge = true;
    },
    hideLoading(state) {
      state.isJudge = false;
    },
  },
});

// 导出store
export default store;
